package com.superbytecode.common.enums;

import com.superbytecode.common.dict.IDictionary;
import com.superbytecode.common.response.IResponseCode;

/**
 * All rights Reserved, Designed By www.super-bytecode.com
 *
 * @ProjectName: superbytecode-beacon
 * @Package: com.superbytecode.common.enums
 * @ClassName: ResponseCodeEnum
 * @Description: [通用结果编码枚举]
 * <p> </p>
 * @Author: [Lance Ting]
 * @Date: 2023/11/21 15:44
 * @Version: V1.0
 * @Copyright: 2023 www.super-bytecode.com Inc. All rights reserved.
 * TODO: 注意,本文件Lance Ting所作,如果转载或使用请标明具体出处!
 **/
public enum ResponseCodeEnum implements IResponseCode, IDictionary<String> {
    SUCCESS("SUCCESS", "操作成功"),//
    FAILURE("FAILURE", "操作失败"),//
    ERROR("ERROR", "❌系统异常"),//
    ILLEGAL_ARGUMENT("ILLEGAL_ARGUMENT", "无效参数"),//
    INTERFACE_SYSTEM_ERROR("INTERFACE_SYSTEM_ERROR", "外部接口调用异常"),//
    ;

    // ----------------------------------------------------------
    ResponseCodeEnum(String code, String message) {
        init(code, message);
    }

    /**
     * 返回的错误码.
     *
     * @return String
     */
    @Override
    public String getCode() {
        return IDictionary.super.getDictCode();
    }

    /**
     * 返回的错误信息.
     *
     * @return String
     */
    @Override
    public String getMessage() {
        return IDictionary.super.getDictDesc();
    }
}